<?xml version="1.0" encoding="ISO-8859-1" ?>

<html xmlns="http://www.w3.org/1999/xhtml" 
	  xmlns:h="http://java.sun.com/jsf/html" 
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:c="http://java.sun.com/jsp/jstl/core"
	  xmlns:p="http://primefaces.org/ui"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:func="http://ucblive.com/functions">

<h:head>

</h:head> 

<h:body>
	<ui:composition template="/template.xhtml">
		<ui:define name="conteudo">
			<center>
				<h:form>				  	    
			  	    <p:accordionPanel value="#{disciplinaManagedBean.cursos}" var="curso" activeIndex="-1">
			  	    	<p:tab title="#{curso.nome}" id="forunsCurso">
			  	    		<p:dataList value="#{disciplinaManagedBean.disciplinas}" var="disciplina" 
			  	    					itemType="none" styleClass="listaDisciplinas">
			  	    			<p:column rendered="#{func:cursoHasDisciplina(curso,disciplina)}">
			  	    				<h:commandLink action="#{topicoManagedBean.populaTopicos}" value="#{disciplina.nome}">
			  	    					<f:setPropertyActionListener value="#{disciplina}" target="#{topicoManagedBean.disciplina}"/>
			  	    				</h:commandLink> 
			  	    			</p:column>
			  	    		</p:dataList>
			  	    	</p:tab>
			  	    </p:accordionPanel>
			  	</h:form>
			</center>
		</ui:define>
</ui:composition>
</h:body> 
</html>